home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 25 / Mac Magazin and MacEasy Magazine CD - Issue 25.iso / Grafik & Text / Alpha / Help / Shells < prev    next >
Text File  |  1996-06-04  |  3KB  |  75 lines

  1.  
  2.     TCL SHELL
  3.  
  4. The basic idea of the Tcl Shell is to provide an interactive way to access 
  5. TCL, it is *NOT* intended to serve as a pseudo-unix-shell. However, I don't 
  6. use MPW or AU/X, and therefore I implemented a few very useful unix shell 
  7. functions. 
  8.  
  9. All pathnames must be mac pathnames; relative pathnames start 
  10. with colons, absolute pathnames don't. For instance, ':file1' specifies a 
  11. file named 'file1' in the current directory. '::file2' specfies a file in 
  12. the parent directory, and ':::file3' is a file in the parent's parent's 
  13. directory. Additionally, hitting the tab key w/ a partial pathname invokes 
  14. a filename-completion function that tries to fill in the rest of the 
  15. characters of the name. 
  16.  
  17. The supported functions are all valid Tcl commands and the following:
  18.  
  19. cat <file>...  Dump contents of files into shell window.
  20.  
  21. cd <relative or absolute pathname>
  22.     Change directory. If called w/ no arguments, go to home directory if no 
  23.     arguments.
  24. cp <file1> <file2>
  25.     or
  26. cp <file1> .... <destDir>
  27.     Basic unix functionality, recursive.
  28.  
  29. dirs - show current directory stack. See 'pushd' and 'popd'.
  30.  
  31. grep <pat> <file>...
  32.     Grep, reasonably slow.
  33.  
  34. mkdir <dirname> - make a directory (folder)
  35.  
  36. ls [-F|l] [<file>]...
  37.     Two, mutually exclusive flags. '-F' just gives the normal display, with 
  38.     a '*' behind applications and a '/' behind directories (folders). '-l' 
  39.     presents a long listing, including sizes of both forks, creator, file 
  40.     type, and last modification time. 'procs.tcl' includes functions 'l' and 
  41.     'll' which serve as my Unix aliases to 'ls -F' and 'ls -l'.
  42.     
  43. mv <file1> <file2>
  44.     or
  45. mv <file1> .... <destDir>
  46.     Moves a file, potentially across volume boundaries. Recursive.
  47.  
  48. popd - Pop top dir off dir stack and 'cd' to it.
  49.  
  50. pushd [<dir>] - If 'dir' specified, push current folder into directory 
  51.     stack and 'cd' to dir. Otherwise, swap current dir w/ top of dir stack.
  52.  
  53. ps
  54.     Prints a list of active applications.
  55.     
  56. rm [-r] <file>...
  57.     Removes files and empty directories. "-r" allows recursive removal, but 
  58.     DON'T BLAME ME IF YOU DELETE YOUR ENTIRE DRIVE!
  59.     
  60. rmdir <dirname> - remove a directory (folder)
  61.  
  62. wc <file>...
  63.     'wc' primitive from unix, counts lines, words, characters.
  64.  
  65.  
  66. The file ":Tcl:SystemCode:shell.tcl" contains Tcl code implementing the 
  67. shell interface.  You can change this to suit your tastes.  One recent 
  68. goody is that you can re-execute previous commands merely by moving the 
  69. cursor to the line and hitting the return key.  If there is no '>' 
  70. character on the line when you hit a carriage return, the return is an 
  71. ordinary new line.
  72.  
  73. A primitive history mechanism can be used to move up and down the last 20 
  74. commands by using control-uparrow and control-downarrow at a prompt.
  75.